﻿using UnityEngine;

namespace UFrame
{
    public class RLoadMa
    {
        public static T Load<T>(string path) where T : UnityEngine.Object
        {
            T t = Resources.Load<T>(path);
            if (t == null)
            {
                Debug.Log("不存在: " + path);
            }

            return t;
        }
        
        public static T LoadInstance<T>(string path) where T : UnityEngine.Object
        {
            T t = Resources.Load<T>(path);
            if (t == null)
            {
                Debug.Log("不存在: " + path);
                return null;
            }
            return GameObject.Instantiate(t);;
        }
        
    }
}